/**
 * Written by Timbot
 * V1.0, June 2007
 */
package com.as3.timbot.mvc
{
	import com.as3.timbot.mvc.IView;
	import com.as3.timbot.mvc.IModel;
	import com.as3.timbot.mvc.IController;
	import flash.display.Sprite;
	import flash.events.Event;
	
	public class AbstractController implements IController
	{
		private var __model:IModel;
		private var __view:IView;
		
		public function AbstractController(model:IModel):void
		{
			///set the model for this controller
			setModel (model);
		}
		/**
		* Sets the model for this controller.
		*/
		public function setModel (m:IModel):void
		{
			__model = m;
		}

		/**
		* Returns the model for this controller.
		*/
		public function getModel ():IModel
		{
			return __model;
		}

		/**
		* Sets the view this controller is servicing.
		*/
		public function setView (v:IView):void
		{
			__view = v;
		}

		/**
		* Returns this controller's view.
		*/
		public function getView ():IView
		{
			return __view;
		}
	}
}